//package chapter_13

// 易于访问Fruit
import chapter_13.Fruit
// 易于访问chapter_13的所有成员
import chapter_13._
// 易于访问Fruits的所有成员
import chapter_13.Fruits._


import java.sql.{Date => SDate}
import java.{sql => S}

import chapter_13.Fruits.{Apple, Orange}
import chapter_13.Fruits.{Apple => McIntosh, Orange}
import chapter_13.Fruits.{Apple => _, _}
import chapter_13.Fruits.{_}
import chapter_13.Fruits.{Apple => McIntosh, _}


object ImportFruit {

  def showFruit(fruit: Fruit): Unit = {
    import fruit._
    println(name + "s are " + color)
  }

  def main(args: Array[String]): Unit = {
    val fruit = new Fruit("banana", "yellow") {
      override def toString: String = "I am banana."
    }
    println(fruit)
    showFruit(fruit)
  }
}
